package com.ruoyi.project.kbjz.service.impl;

import com.ruoyi.project.kbjz.domain.HisPatient;
import com.ruoyi.project.kbjz.mapper.HisPatientMapper;
import com.ruoyi.project.kbjz.service.IHisPatientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class HisPatientServiceImpl implements IHisPatientService {
    @Autowired
    private HisPatientMapper hisPatientMapper;
    //根据患者id查询患者信息
    @Override
    public HisPatient selectPatientByPersonIdService(String patientPersonId) {
        return hisPatientMapper.selectPatientByPersonId(patientPersonId);
    }

    //添加患者信息

    @Override
    public int insertPatientService(HisPatient hisPatient) {
        return hisPatientMapper.insertPatient(hisPatient);
    }

    //查询所有患者信息

    @Override
    public List<HisPatient> selectPatientAllService(String patientName,String patientPersonId ,String patientMobile) {
        return hisPatientMapper.selectPatientAll(patientName, patientPersonId, patientMobile);
    }
}
